package com.itheima.api.stream.demo04;

import java.util.ArrayList;

public class StreamDemo01 {

    public static void main(String[] args) {

        ArrayList<Integer> arrayList = new ArrayList<Integer>();

        arrayList.add(23);
        arrayList.add(12);
        arrayList.add(45);
        arrayList.add(20);

        arrayList.stream().forEach(s -> System.out.println(s));

        System.out.println("----------------------------------------------");

        long count = arrayList.stream().filter(s -> s >= 23).count();

        System.out.println(count);

    }

}
